-
Notifications
You must be signed in to change notification settings - Fork 5
ANDROID-16934 -- (II) Remove databinding related code #479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ANDROID-16934 -- (II) Remove databinding related code #479
Conversation
…"LoadErrorFeedabackView" component and update corresponding README file.
…ck/screen" component
… "HeaderView" component and update corresponding README file
… "HighlightedCardView" component and update its corresponding README file.
… "Input", "TextInput" and expose some attributes also from "CheckBoxInput" components, updating their corresponding README files
|
[Firebase] 📱 New catalog for testing generated: |
…tInput" component
|
[Firebase] 📱 New catalog for testing generated: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes Android Data Binding infrastructure from six components in the library module: LoadErrorFeedbackView, HeaderView, HighlightedCardView, CheckBoxInput, Input, and TextInput. The changes eliminate BindingMethods, InverseBindingMethods, and BindingAdapter annotations while updating documentation to reflect that these components no longer support data binding.
Changes:
- Removed data binding annotations and adapter methods from input components (TextInput, Input, CheckBoxInput) and view components (LoadErrorFeedbackView, HeaderView, HighlightedCardView)
- Added wrapper methods in CheckBoxInput and HeaderView to maintain backward compatibility with existing attribute names
- Updated README files to clarify that components support attribute-based configuration only, not data binding
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| library/src/main/java/com/telefonica/mistica/input/TextInput.kt | Removed data binding imports, annotations, and text watcher adapter method |
| library/src/main/java/com/telefonica/mistica/input/README.md | Updated documentation to remove data binding references and added note about standard View implementation |
| library/src/main/java/com/telefonica/mistica/input/Input.kt | Removed data binding imports and BindingMethods annotation for base Input class |
| library/src/main/java/com/telefonica/mistica/input/CheckBoxInput.kt | Removed data binding annotations and check watcher adapter; added wrapper methods for attribute compatibility |
| library/src/main/java/com/telefonica/mistica/highlightedcard/README.md | Updated documentation to remove data binding reference |
| library/src/main/java/com/telefonica/mistica/highlightedcard/HighlightedCardView.kt | Removed data binding imports and BindingMethods annotation; reordered import statements |
| library/src/main/java/com/telefonica/mistica/header/README.md | Updated documentation to remove data binding reference |
| library/src/main/java/com/telefonica/mistica/header/HeaderView.kt | Removed data binding annotations and added wrapper methods with "header" prefix for attribute compatibility |
| library/src/main/java/com/telefonica/mistica/feedback/screen/README.md | Updated documentation to remove data binding reference |
| library/src/main/java/com/telefonica/mistica/feedback/error/README.md | Updated documentation to remove data binding reference |
| library/src/main/java/com/telefonica/mistica/feedback/error/LoadErrorFeedbackView.kt | Removed data binding annotations and unused import |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| init { | ||
| LayoutInflater.from(context).inflate(R.layout.load_error_feedback, this, true) | ||
| LayoutInflater.from(context).inflate(R.layout.load_error_feedback, this, true) |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate layout inflation on line 27. The same layout is being inflated twice, which will create duplicate views in the hierarchy and cause incorrect UI rendering.
| LayoutInflater.from(context).inflate(R.layout.load_error_feedback, this, true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied change here: 85a6de1
| fun setHeaderFirstPretitle(@StringRes textRes: Int?) = setFirstPretitle(textRes) | ||
| fun setHeaderTitle(text: CharSequence?) = setTitle(text) | ||
|
|
||
| fun setHeaderInverse(value: Boolean) = setInverse(value) | ||
| fun setHeaderHasTopPadding(value: Boolean) = setHasTopPadding(value) | ||
|
|
||
| fun setHeaderFirstPretitle(text: CharSequence?) = setFirstPretitle(text) |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate method definition for setHeaderFirstPretitle. Line 238 accepts @stringres Int? while line 244 accepts CharSequence?. This creates a naming collision that will cause compilation errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently these methods do not launch any compilation errors due to signature is different.
| fun setHeaderSubtitleHasSecondaryColor(value: Boolean) = setSubtitleHasSecondaryColor(value) | ||
|
|
||
| fun setHeaderActionButtonText(text: CharSequence?) = setActionButtonText(text) | ||
| fun setHeaderSecondaryActionButtonText(text: CharSequence?) = setSecondaryActionButtonText(text) |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds 120 characters. Consider breaking this line for better readability.
| fun setHeaderSecondaryActionButtonText(text: CharSequence?) = setSecondaryActionButtonText(text) | |
| fun setHeaderSecondaryActionButtonText(text: CharSequence?) = | |
| setSecondaryActionButtonText(text) |
| * Drop Down Input --> `com.telefonica.mistica.input.DropDownInput` | ||
|
|
||
| All them can be placed directly on any layout, and can be configured with the following attributes (**All atributes for all types support databinding**): | ||
| All them can be placed directly on any layout, and can be configured with the following attributes (**All attributes are supported for all types**): |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected grammar from 'All them' to 'All of them'.
| All them can be placed directly on any layout, and can be configured with the following attributes (**All attributes are supported for all types**): | |
| All of them can be placed directly on any layout, and can be configured with the following attributes (**All attributes are supported for all types**): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied change here: 1014011
| fun setInputError(@StringRes errorRes: Int?) { | ||
| if (errorRes == null) { | ||
| error = null | ||
| setErrorEnabled(false) | ||
| } else { | ||
| error = context.getString(errorRes) | ||
| setErrorEnabled(true) | ||
| } | ||
| } |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a potential breaking change. The new public method setInputError(@stringres Int?) was introduced as a replacement for the removed data binding attribute 'inputError'. While this maintains functional compatibility through attribute-based configuration, consumers who were directly calling methods on CheckBoxInput instances may need to update their code if they were using the data binding setError method signature that accepted CharSequence. Please apply the 'Breaking change' label to this PR. Migration notes should be added when drafting the release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After merging all this feature branch in Mistica, is necessary to fit current implementation in "android-messenger" incresing new Mistica version.
| fun setInputCheckText(text: CharSequence?) { | ||
| setText(text) | ||
| } | ||
|
|
||
| fun getInputCheckText(): CharSequence? { | ||
| return getText() | ||
| } |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are potential breaking changes. The new public methods setInputCheckText and getInputCheckText replace the removed data binding methods setText and getText. While these maintain functional compatibility through attribute-based configuration, the change in method naming may affect consumers who were calling these methods directly. Please apply the 'Breaking change' label to this PR. Migration notes should be added when drafting the release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same like previous one
|
[Firebase] 📱 New catalog for testing generated: |
haynlo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
25e476d
into
ANDROID-16934/base-remove-databinding
🎟️ Jira ticket
ANDROID-16934
🥅 What's the goal?
librarymodule and the corresponding components.This PR is a part of this three:
After all these PRs are merged, a final one will be created to remove the Data Binding feature from the
build.gradlefile.🚧 How do we do it?
Remove BindingMethods, InverseBindingMethod and BindingAdapters methods and update corresponding README files from next components:
* LoaderrorFeedbackView
* HeaderView
* HightlightedCardView
* CheckBoxInput
* Input
* TextInput
☑️ Checks
🧪 How can I test this?
As is mentioned in the corresponding ANDROID-16934 ticket, is tested in the "android-messenger" client project that the total PR changes exposed in #476 works correctly.